import { createRequest } from '@/request'
import { formData } from '@/request/common'

// 获取项目成果信息
export const projectResultGet = id => {
  return createRequest({
    url: `/teacher/project-result/get/${id}`,
    method: 'get',
  })
}

// 上传文件
export const projectResultUpload = (data, id) => {
  return createRequest({
    url: `/teacher/project-result/upload/${id}`,
    method: 'post',
		data: formData(data)
  })
}

// 上传项目成果（图片和链接）
export const projectResultSave = (data, id) => {
  return createRequest({
    url: `/teacher/project-result/save/${id}`,
    method: 'post',
		data
  })
}
